﻿<div id="dlg_CondicionVariablePromocional" title="Condición por Variable Promocional">
    <div class="col-sm-12">
        <div class="col-sm-12 no-padding">
            <div class="col-sm-12 no-padding">
                <label>Variable</label>
                <input id="ddl_VarPromo_Servicio" data-role="dropdownlist" data-auto-bind="false" data-value-primitive="true"
                    data-bind="source: variablesDS" data-value-field="Value" data-text-field="Text" style="width: 100%" />
            </div>
        </div>

        <div class="col-sm-12 align-center">
            <div class="space-4"></div>
            <button id="btn_VarPromo_Agregar" class="btn btn-sm btn-primary">Agregar</button>
        </div>

        <div class="space-4"></div>

        <div class="col-sm-12 no-padding">
            <div id="grd_VarPromo_Variables" data-role="grid" style="width: auto" data-bind="source: variablesDS"
            data-column="true" data-navigatable="true" data-selectable="row" data-sortable="true"                    
            data-columns='[        
                { "field": "Value",   "title": "Id",      "width": "20px" },
                { "field": "Text",    "title": "Nombre",  "width": "100px"  },
            ]'>
            </div>
        </div>

        <div class="col-sm-12 align-center">
            <div class="space-4"></div>
            <button id="btn_VarPromo_Aceptar" class="btn btn-sm btn-primary">Aceptar</button>
            <button id="btn_VarPromo_Cancelar" class="btn btn-sm btn-default">Cancelar</button>
        </div>
    </div>
</div>

<script>
    var CondicionVariablePromocionalVM;

    $(document).ready(function () {
        CondicionVariablePromocionalVM = new kendo.observable({
            @*variablesDS: AjaxParamsActionPost('@Url.Action("GetEntities", "EstadoGeneral")', { 'rowStatus': true }),*@
        });

        kendo.bind('#dlg_CondicionVariablePromocional', CondicionVariablePromocionalVM);
    });
</script>